package com.handu.luna.core.domain.order;

import com.handu.luna.core.domain.BaseRepository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by 123 on 2014/7/21.
 */
public interface OrderOperatorRepository extends JpaRepository<OrderOperator,Long> ,BaseRepository<OrderOperator>,JpaSpecificationExecutor<OrderOperator> {

    @Query("select o from OrderOperator o where o.orderId =:orderId order by o.createdDate desc ")
    public List<OrderOperator> findAll(@Param("orderId")long orderId);

}
